Method: Sequel::Postgres::ArrayOp#[]
- Defined in:
- lib/sequel/extensions/pg_array_ops.rb
permalink #[](key) ⇒ Object
Access a member of the array, returns an SQL::Subscript instance:
array_op[1] # array[1]
91 92 93 94 95 |
# File 'lib/sequel/extensions/pg_array_ops.rb', line 91 def [](key) s = Sequel::SQL::Subscript.new(self, [key]) s = ArrayOp.new(s) if key.is_a?(Range) s end |